package com.sunwayworld.basemodule.business.batch.resource;

import com.sunwayworld.basemodule.samplemanage.sample.bean.LimsSampleBean;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sunwayworld.basemodule.business.batch.bean.LimsBatchSampleBean;
import com.sunwayworld.basemodule.business.batch.service.LimsBatchSampleService;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/business/batch-samples")
public interface LimsBatchSampleResource extends GenericResource<LimsBatchSampleService, LimsBatchSampleBean, Long> {

    @Log(value = "新增样本产品", type = LogType.INSERT)
    @RequestMapping(value = "/insert/sample",method = RequestMethod.POST)
    void insertSample(RestJsonWrapperBean wrapper);

    @Log(value = "选择历史样本", type = LogType.INSERT)
    @RequestMapping(value = "/sample/choose",method = RequestMethod.POST)
    void sampleChoose(RestJsonWrapperBean wrapper);

    @Log(value = "修改样本产品", type = LogType.UPDATE)
    @RequestMapping(value = "/update/sample",method = RequestMethod.PUT)
    void updateSample(RestJsonWrapperBean wrapper);

    @RequestMapping(value = "/select/samples",method = RequestMethod.POST)
    Page<LimsSampleBean> selectBatchSampleInfo(RestJsonWrapperBean wrapper);

    @Log(value = "样本检测任务查询", type = LogType.SELECT)
    @RequestMapping(value = "/select/batchSampleInfos",method = RequestMethod.POST)
    Page<LimsSampleBean> selectBatchSampleInfos(RestJsonWrapperBean wrapper);

    @Log(value = "删除送检单样本", type = LogType.DELETE)
    @RequestMapping(value = "/delete/samples",method = RequestMethod.DELETE)
    void deleteBatchSamples(RestJsonWrapperBean wrapper);

    @GetMapping(value = "/select/samples/{id}")
    LimsSampleBean getBatchSampleInfo(@PathVariable Long id);
}
